import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path:"/",
      component:()=>import("@/views/login.vue")
    },
    {
      path: "/",
      redirect: "/home"
    }, {
      path: "/home",
      component: () => import("@/views/home.vue"),
      children: [
        {
          path:"tasks/:projectId",
          component:()=>import("@/views/task/task.vue")
        },
        {
          path: "",
          alias: "welcome",
          component: () => import("@/views/welcome.vue")
        }, {
          path: "projects",
          component: () => import("@/views/project/project.vue"),
        }, {
          path: "my-project",
          component: () => import("@/views/project/my-project.vue"),
        }, {
          path: "pigeonhole-project",
          component: () => import("@/views/project/pigeonhole-project.vue"),
        }, {
          path: "delete-project",
          component: () => import("@/views/project/delete-project.vue"),
        }
      ]
    }
  ]
})

export default router
